<fieldset class="solid">
	<legend>创建模块</legend>
	<input type="hidden" name="module.id" value="${(module.id)!}" />
	<div>
		<label>隶属项目</label>
		<select name="module.project_id" id="project_id">
		</select>
		${project_idMsg!}
	</div>
	<div>
		<label>上级模块</label>
		<select name="module.parent_id" id="parent_id">
		</select>
		${parent_idMsg!}
	</div>
	<div>
		<label>模块名称</label>
		<input type="text" name="module.module_name" value="${(module.module_name)!}" /
		>${module_nameMsg!}
	</div>
	<div>
		<label>排序</label>
		<input type="text" name="module.module_index" value="${(module.module_index)!}" />
		${module_indexMsg!}
	</div>
	<div>
		<label>&nbsp;</label>
		<input value="提交" type="submit">
	</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function(){
	var initSel_project_id = function(callback){
		SelectTool.initSelectData({
			elId:"project_id",
			url:"${BASE_PATH!}/project/listAll",
			postData:{},
			valueName:"id",
			textName:"project_name",
			defaultValue:"${(module.project_id)!}",
			haveAll:false,
			callback:callback
		});
	}
	var initSel_parent_id = function(callback){
		SelectTool.initSelectData({
			elId:"parent_id",
			url:"${BASE_PATH!}/module/listByProjectId",
			postData:{"project_id":$("#project_id").val()},
			valueName:"id",
			textName:"module_name",
			defaultValue:"${(module.parent_id)!}",
			haveAll:true,
			callback:callback
		});
	}
	$("#project_id").change(function(){
		initSel_parent_id(function(){
		});
	});
	//初始化
	initSel_project_id(function(){
		initSel_parent_id(function(){});
	});
});
</script>